package oa.lu.service;

import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import oa.dao.LogDao;

public class OperationManager {
	public String query(HttpServletRequest request,HttpServletResponse respnse){
		String strCurrentPage = request.getParameter("currPage");
		int currentPage = 1;
		try{
			currentPage=Integer.parseInt(strCurrentPage);
		}catch (Exception e){
			currentPage=1;
		}
		LogDao lDao = new LogDao();
		String deptid=request.getParameter("dept");
		String starttime=request.getParameter("starttime");
		String endtime=request.getParameter("endtime");
		Page logPage = lDao.query(currentPage,deptid,starttime,endtime);
		request.setAttribute("logPage", logPage);
		request.setAttribute("starttime", starttime);
		request.setAttribute("endtime", endtime);
		request.setAttribute("deptid", deptid);
		return "query";
	}
}
